#ifndef BLOGMANAGER_H
#define BLOGMANAGER_H

#include <QObject>
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptValue>

#include "contentmanager.h"
#include "model/blog.h"
class BlogManager : public ContentManager
{
    Q_OBJECT
public:
    explicit BlogManager();
    void getBlog(const QString &id);
    void getBlogComments(const QString &id, int limit = 20, int offset = 0);
signals:
    void handleBlog(Blog *blog, const QString &msg);
    void handleComments(QList<Comment*> *comments, const QString &msg);
private slots:
    void parseData(QScriptValue json, const QString &msg);
private:
};

#endif // BLOGMANAGER_H
